package com.rightsidetech.trade.dtos.request;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotNull;
import java.io.Serializable;

@Data
public class TdCommodityUserAppOrderDetailZPRequest implements Serializable {
    @ApiModelProperty(value = "商品id",required = true)
    @NotNull(message = "商品id不能为空")
    private Long commodityId;

/*    @ApiModelProperty(value = "购买方式,  0-直接买新, 1-以旧换新",required = true)
    @NotNull(message = "购买方式不能为空")
    @Range(min = 0,max = 1)
    private Byte buyType;*/

    @ApiModelProperty(value = "商品条码",required = false)
    private String commodityBarCode;

    @ApiModelProperty(value = "商品规格",required = false)
    private String commoditySpecs;

/*    @ApiModelProperty(value = "单件价格",required = true)
    private BigDecimal commodityPrice;*/

    @ApiModelProperty(value = "赠品数量",required = true)
    @NotNull(message = "数量不能为空")
    private Integer commodityNum;

    @ApiModelProperty(value = "商品标签, 0-商品, 1-赠品, 2-超值换购",required = true)
    @NotNull(message = "标签不能为空")
    @Range(min = 1,max = 2, message = "标签不正确")
    private Byte commodityTag;

/*    @ApiModelProperty("商品图片")
    private String picture;*/

@ApiModelProperty(value = "是否需要邮寄",hidden = true)
private Boolean isExpress;
}
